<template>
  <div class="height100 flex flex_d bg_fff" :class="is_close?'close_nav':''">
    <div class="flex1 flex flex_d" >
      <div class="flex_s pad_lr30">

        <el-form ref="queryForm"  label-width="104px">
          <el-row class="flex_ac">
            <div class="f16 pad_tb20"><span class="color">项目列表</span> / 预览答题</div>
            <div class="flex_ac margin_a">
              <el-button type="primary" :loading="is_ajax" @click="try_submit">预览提交</el-button>
            </div>
          </el-row>
        </el-form>
      </div>
      <div class="flex1 page_div js_page_div" >
        <el-scrollbar class="page_div_scroll" ref="scrollbar">
          <answerform ref="answerform" />
        </el-scrollbar>
      </div>
    </div>

  </div>
</template>

<script>
import answerform from "../answer/answer_form.vue";
export default {
  name: 'shopList',
  components: {answerform},
  data () {
    return {
      is_close:false,
      is_ajax:false
    }
  },
  created() {
    this.id=this.$route.query.id || '';
    this.title=this.$route.query.title || '';
    this.type=this.$route.query.type || 2;
    this.project_id=this.$route.query.project_id || '';
    this.$nextTick(()=>{
      this.$refs.answerform.init({id:this.id,project_id:this.project_id,title:this.title,type:this.type})
    })
  },
  methods:{
    try_submit(){
        this.$refs.answerform.try_submit()
    }
  }
}
</script>

<style scoped>

</style>
